<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <title>选择器优先级</title>
    <style>
        /* 格式:(a,b,c) 有权重先看权重，权重一样了再看顺序 */

        #atguigu {
            color: orange;
        }
        .container span.slogan {
            color: skyblue;
        }
        div>p>span:nth-child(1) {
            color: red;
        }
        .slogn {
            color: purple !important;
        }
    </style>
</head>
<body>
    <div class="container">
        <p> 
            <span class="slogan" id="atguigu" style="color: blue;">天下没有难学的技术</span>
            <span>欢迎同学们来学习！</span>
        </p>
    </div>
</body>
</html>